﻿

using Dapper;
 
using System.Data;
using System;
using System.Linq;
using hCommand.abs;
using System.Data.SqlClient;

namespace hCommand.mySql
{
    public class SysServer : AbsSysServer, ISysServer
    {
        public override long querySequence(IDbConnection conn, IDbTransaction trans)
        {
            
                var p = new SqlParameter("myIndex", SqlDbType.BigInt);
            p.Direction = ParameterDirection.Output;
                 runProcedure("", "nextval", p);
                return (long)p.Value;
           

        }

        public override DateTime GetTime()
        {
            return getConnection("").Query<DateTime>("select now()").Single();
        }
    }
}
